<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="主表id" prop="excelId">
        <el-input
          v-model="queryParams.excelId"
          placeholder="请输入主表id"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="行号" prop="baRowNumber">
        <el-input
          v-model="queryParams.baRowNumber"
          placeholder="请输入行号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="取样桩号" prop="quyzh">
        <el-input
          v-model="queryParams.quyzh"
          placeholder="请输入取样桩号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="具体位置" prop="jutwz">
        <el-input
          v-model="queryParams.jutwz"
          placeholder="请输入具体位置"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="取样深度" prop="quysd">
        <el-input
          v-model="queryParams.quysd"
          placeholder="请输入取样深度"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="环刀编号" prop="huandbh">
        <el-input
          v-model="queryParams.huandbh"
          placeholder="请输入环刀编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="土+环刀质量" prop="tujhdzl">
        <el-input
          v-model="queryParams.tujhdzl"
          placeholder="请输入土+环刀质量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="环刀质量" prop="huandzl">
        <el-input
          v-model="queryParams.huandzl"
          placeholder="请输入环刀质量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="土质量" prop="tuzl">
        <el-input
          v-model="queryParams.tuzl"
          placeholder="请输入土质量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="环刀容积" prop="huandrj">
        <el-input
          v-model="queryParams.huandrj"
          placeholder="请输入环刀容积"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="湿密度" prop="shimd">
        <el-input
          v-model="queryParams.shimd"
          placeholder="请输入湿密度"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒号1" prop="heh1">
        <el-input
          v-model="queryParams.heh1"
          placeholder="请输入盒号1"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒号2" prop="heh2">
        <el-input
          v-model="queryParams.heh2"
          placeholder="请输入盒号2"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒号1id" prop="heh1Id">
        <el-input
          v-model="queryParams.heh1Id"
          placeholder="请输入盒号1id"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒号2id" prop="heh2Id">
        <el-input
          v-model="queryParams.heh2Id"
          placeholder="请输入盒号2id"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒+湿土质量1" prop="hejstzl1">
        <el-input
          v-model="queryParams.hejstzl1"
          placeholder="请输入盒+湿土质量1"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒+湿土质量2" prop="hejstzl2">
        <el-input
          v-model="queryParams.hejstzl2"
          placeholder="请输入盒+湿土质量2"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒+干土质量1" prop="hejgtzl1">
        <el-input
          v-model="queryParams.hejgtzl1"
          placeholder="请输入盒+干土质量1"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒+干土质量2" prop="hejgtzl2">
        <el-input
          v-model="queryParams.hejgtzl2"
          placeholder="请输入盒+干土质量2"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="水质量1" prop="shuizl1">
        <el-input
          v-model="queryParams.shuizl1"
          placeholder="请输入水质量1"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="水质量2" prop="shuizl2">
        <el-input
          v-model="queryParams.shuizl2"
          placeholder="请输入水质量2"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒质量1" prop="hezl1">
        <el-input
          v-model="queryParams.hezl1"
          placeholder="请输入盒质量1"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="盒质量2" prop="hezl2">
        <el-input
          v-model="queryParams.hezl2"
          placeholder="请输入盒质量2"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="干土质量1" prop="gantzl1">
        <el-input
          v-model="queryParams.gantzl1"
          placeholder="请输入干土质量1"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="干土质量2" prop="gantzl2">
        <el-input
          v-model="queryParams.gantzl2"
          placeholder="请输入干土质量2"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="含水率1" prop="hansl1">
        <el-input
          v-model="queryParams.hansl1"
          placeholder="请输入含水率1"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="含水率2" prop="hansl2">
        <el-input
          v-model="queryParams.hansl2"
          placeholder="请输入含水率2"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="含水率平均值" prop="hanslpjz">
        <el-input
          v-model="queryParams.hanslpjz"
          placeholder="请输入含水率平均值"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="干密度" prop="ganmd">
        <el-input
          v-model="queryParams.ganmd"
          placeholder="请输入干密度"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="压实度" prop="yasd">
        <el-input
          v-model="queryParams.yasd"
          placeholder="请输入压实度"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="土壤类别" prop="turlb">
        <el-input
          v-model="queryParams.turlb"
          placeholder="请输入土壤类别"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="最大干密度" prop="zuidgmd">
        <el-input
          v-model="queryParams.zuidgmd"
          placeholder="请输入最大干密度"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="编号" prop="bianh">
        <el-input
          v-model="queryParams.bianh"
          placeholder="请输入编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['report_ljlm:ljlmYsdhdfjlbBaDetail:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['report_ljlm:ljlmYsdhdfjlbBaDetail:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['report_ljlm:ljlmYsdhdfjlbBaDetail:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['report_ljlm:ljlmYsdhdfjlbBaDetail:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="ljlmYsdhdfjlbBaDetailList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="id" align="center" prop="id" v-if="true"/>
      <el-table-column label="主表id" align="center" prop="excelId" />
      <el-table-column label="行号" align="center" prop="baRowNumber" />
      <el-table-column label="取样桩号" align="center" prop="quyzh" />
      <el-table-column label="具体位置" align="center" prop="jutwz" />
      <el-table-column label="取样深度" align="center" prop="quysd" />
      <el-table-column label="环刀编号" align="center" prop="huandbh" />
      <el-table-column label="土+环刀质量" align="center" prop="tujhdzl" />
      <el-table-column label="环刀质量" align="center" prop="huandzl" />
      <el-table-column label="土质量" align="center" prop="tuzl" />
      <el-table-column label="环刀容积" align="center" prop="huandrj" />
      <el-table-column label="湿密度" align="center" prop="shimd" />
      <el-table-column label="盒号1" align="center" prop="heh1" />
      <el-table-column label="盒号2" align="center" prop="heh2" />
      <el-table-column label="盒号1id" align="center" prop="heh1Id" />
      <el-table-column label="盒号2id" align="center" prop="heh2Id" />
      <el-table-column label="盒+湿土质量1" align="center" prop="hejstzl1" />
      <el-table-column label="盒+湿土质量2" align="center" prop="hejstzl2" />
      <el-table-column label="盒+干土质量1" align="center" prop="hejgtzl1" />
      <el-table-column label="盒+干土质量2" align="center" prop="hejgtzl2" />
      <el-table-column label="水质量1" align="center" prop="shuizl1" />
      <el-table-column label="水质量2" align="center" prop="shuizl2" />
      <el-table-column label="盒质量1" align="center" prop="hezl1" />
      <el-table-column label="盒质量2" align="center" prop="hezl2" />
      <el-table-column label="干土质量1" align="center" prop="gantzl1" />
      <el-table-column label="干土质量2" align="center" prop="gantzl2" />
      <el-table-column label="含水率1" align="center" prop="hansl1" />
      <el-table-column label="含水率2" align="center" prop="hansl2" />
      <el-table-column label="含水率平均值" align="center" prop="hanslpjz" />
      <el-table-column label="干密度" align="center" prop="ganmd" />
      <el-table-column label="压实度" align="center" prop="yasd" />
      <el-table-column label="土壤类别" align="center" prop="turlb" />
      <el-table-column label="最大干密度" align="center" prop="zuidgmd" />
      <el-table-column label="编号" align="center" prop="bianh" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['report_ljlm:ljlmYsdhdfjlbBaDetail:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['report_ljlm:ljlmYsdhdfjlbBaDetail:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改压实度试验检测记录（环刀法）详细对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="主表id" prop="excelId">
          <el-input v-model="form.excelId" placeholder="请输入主表id" />
        </el-form-item>
        <el-form-item label="行号" prop="baRowNumber">
          <el-input v-model="form.baRowNumber" placeholder="请输入行号" />
        </el-form-item>
        <el-form-item label="取样桩号" prop="quyzh">
          <el-input v-model="form.quyzh" placeholder="请输入取样桩号" />
        </el-form-item>
        <el-form-item label="具体位置" prop="jutwz">
          <el-input v-model="form.jutwz" placeholder="请输入具体位置" />
        </el-form-item>
        <el-form-item label="取样深度" prop="quysd">
          <el-input v-model="form.quysd" placeholder="请输入取样深度" />
        </el-form-item>
        <el-form-item label="环刀编号" prop="huandbh">
          <el-input v-model="form.huandbh" placeholder="请输入环刀编号" />
        </el-form-item>
        <el-form-item label="土+环刀质量" prop="tujhdzl">
          <el-input v-model="form.tujhdzl" placeholder="请输入土+环刀质量" />
        </el-form-item>
        <el-form-item label="环刀质量" prop="huandzl">
          <el-input v-model="form.huandzl" placeholder="请输入环刀质量" />
        </el-form-item>
        <el-form-item label="土质量" prop="tuzl">
          <el-input v-model="form.tuzl" placeholder="请输入土质量" />
        </el-form-item>
        <el-form-item label="环刀容积" prop="huandrj">
          <el-input v-model="form.huandrj" placeholder="请输入环刀容积" />
        </el-form-item>
        <el-form-item label="湿密度" prop="shimd">
          <el-input v-model="form.shimd" placeholder="请输入湿密度" />
        </el-form-item>
        <el-form-item label="盒号1" prop="heh1">
          <el-input v-model="form.heh1" placeholder="请输入盒号1" />
        </el-form-item>
        <el-form-item label="盒号2" prop="heh2">
          <el-input v-model="form.heh2" placeholder="请输入盒号2" />
        </el-form-item>
        <el-form-item label="盒号1id" prop="heh1Id">
          <el-input v-model="form.heh1Id" placeholder="请输入盒号1id" />
        </el-form-item>
        <el-form-item label="盒号2id" prop="heh2Id">
          <el-input v-model="form.heh2Id" placeholder="请输入盒号2id" />
        </el-form-item>
        <el-form-item label="盒+湿土质量1" prop="hejstzl1">
          <el-input v-model="form.hejstzl1" placeholder="请输入盒+湿土质量1" />
        </el-form-item>
        <el-form-item label="盒+湿土质量2" prop="hejstzl2">
          <el-input v-model="form.hejstzl2" placeholder="请输入盒+湿土质量2" />
        </el-form-item>
        <el-form-item label="盒+干土质量1" prop="hejgtzl1">
          <el-input v-model="form.hejgtzl1" placeholder="请输入盒+干土质量1" />
        </el-form-item>
        <el-form-item label="盒+干土质量2" prop="hejgtzl2">
          <el-input v-model="form.hejgtzl2" placeholder="请输入盒+干土质量2" />
        </el-form-item>
        <el-form-item label="水质量1" prop="shuizl1">
          <el-input v-model="form.shuizl1" placeholder="请输入水质量1" />
        </el-form-item>
        <el-form-item label="水质量2" prop="shuizl2">
          <el-input v-model="form.shuizl2" placeholder="请输入水质量2" />
        </el-form-item>
        <el-form-item label="盒质量1" prop="hezl1">
          <el-input v-model="form.hezl1" placeholder="请输入盒质量1" />
        </el-form-item>
        <el-form-item label="盒质量2" prop="hezl2">
          <el-input v-model="form.hezl2" placeholder="请输入盒质量2" />
        </el-form-item>
        <el-form-item label="干土质量1" prop="gantzl1">
          <el-input v-model="form.gantzl1" placeholder="请输入干土质量1" />
        </el-form-item>
        <el-form-item label="干土质量2" prop="gantzl2">
          <el-input v-model="form.gantzl2" placeholder="请输入干土质量2" />
        </el-form-item>
        <el-form-item label="含水率1" prop="hansl1">
          <el-input v-model="form.hansl1" placeholder="请输入含水率1" />
        </el-form-item>
        <el-form-item label="含水率2" prop="hansl2">
          <el-input v-model="form.hansl2" placeholder="请输入含水率2" />
        </el-form-item>
        <el-form-item label="含水率平均值" prop="hanslpjz">
          <el-input v-model="form.hanslpjz" placeholder="请输入含水率平均值" />
        </el-form-item>
        <el-form-item label="干密度" prop="ganmd">
          <el-input v-model="form.ganmd" placeholder="请输入干密度" />
        </el-form-item>
        <el-form-item label="压实度" prop="yasd">
          <el-input v-model="form.yasd" placeholder="请输入压实度" />
        </el-form-item>
        <el-form-item label="土壤类别" prop="turlb">
          <el-input v-model="form.turlb" placeholder="请输入土壤类别" />
        </el-form-item>
        <el-form-item label="最大干密度" prop="zuidgmd">
          <el-input v-model="form.zuidgmd" placeholder="请输入最大干密度" />
        </el-form-item>
        <el-form-item label="编号" prop="bianh">
          <el-input v-model="form.bianh" placeholder="请输入编号" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listLjlmYsdhdfjlbBaDetail, getLjlmYsdhdfjlbBaDetail, delLjlmYsdhdfjlbBaDetail, addLjlmYsdhdfjlbBaDetail, updateLjlmYsdhdfjlbBaDetail } from "@/api/report_ljlm/ljlmYsdhdfjlbBaDetail";

export default {
  name: "LjlmYsdhdfjlbBaDetail",
  data() {
    return {
      // 按钮loading
      buttonLoading: false,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 压实度试验检测记录（环刀法）详细表格数据
      ljlmYsdhdfjlbBaDetailList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        excelId: undefined,
        baRowNumber: undefined,
        quyzh: undefined,
        jutwz: undefined,
        quysd: undefined,
        huandbh: undefined,
        tujhdzl: undefined,
        huandzl: undefined,
        tuzl: undefined,
        huandrj: undefined,
        shimd: undefined,
        heh1: undefined,
        heh2: undefined,
        heh1Id: undefined,
        heh2Id: undefined,
        hejstzl1: undefined,
        hejstzl2: undefined,
        hejgtzl1: undefined,
        hejgtzl2: undefined,
        shuizl1: undefined,
        shuizl2: undefined,
        hezl1: undefined,
        hezl2: undefined,
        gantzl1: undefined,
        gantzl2: undefined,
        hansl1: undefined,
        hansl2: undefined,
        hanslpjz: undefined,
        ganmd: undefined,
        yasd: undefined,
        turlb: undefined,
        zuidgmd: undefined,
        bianh: undefined
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        id: [
          { required: true, message: "id不能为空", trigger: "blur" }
        ],
        excelId: [
          { required: true, message: "主表id不能为空", trigger: "blur" }
        ],
        baRowNumber: [
          { required: true, message: "行号不能为空", trigger: "blur" }
        ],
        quyzh: [
          { required: true, message: "取样桩号不能为空", trigger: "blur" }
        ],
        jutwz: [
          { required: true, message: "具体位置不能为空", trigger: "blur" }
        ],
        quysd: [
          { required: true, message: "取样深度不能为空", trigger: "blur" }
        ],
        huandbh: [
          { required: true, message: "环刀编号不能为空", trigger: "blur" }
        ],
        tujhdzl: [
          { required: true, message: "土+环刀质量不能为空", trigger: "blur" }
        ],
        huandzl: [
          { required: true, message: "环刀质量不能为空", trigger: "blur" }
        ],
        tuzl: [
          { required: true, message: "土质量不能为空", trigger: "blur" }
        ],
        huandrj: [
          { required: true, message: "环刀容积不能为空", trigger: "blur" }
        ],
        shimd: [
          { required: true, message: "湿密度不能为空", trigger: "blur" }
        ],
        heh1: [
          { required: true, message: "盒号1不能为空", trigger: "blur" }
        ],
        heh2: [
          { required: true, message: "盒号2不能为空", trigger: "blur" }
        ],
        heh1Id: [
          { required: true, message: "盒号1id不能为空", trigger: "blur" }
        ],
        heh2Id: [
          { required: true, message: "盒号2id不能为空", trigger: "blur" }
        ],
        hejstzl1: [
          { required: true, message: "盒+湿土质量1不能为空", trigger: "blur" }
        ],
        hejstzl2: [
          { required: true, message: "盒+湿土质量2不能为空", trigger: "blur" }
        ],
        hejgtzl1: [
          { required: true, message: "盒+干土质量1不能为空", trigger: "blur" }
        ],
        hejgtzl2: [
          { required: true, message: "盒+干土质量2不能为空", trigger: "blur" }
        ],
        shuizl1: [
          { required: true, message: "水质量1不能为空", trigger: "blur" }
        ],
        shuizl2: [
          { required: true, message: "水质量2不能为空", trigger: "blur" }
        ],
        hezl1: [
          { required: true, message: "盒质量1不能为空", trigger: "blur" }
        ],
        hezl2: [
          { required: true, message: "盒质量2不能为空", trigger: "blur" }
        ],
        gantzl1: [
          { required: true, message: "干土质量1不能为空", trigger: "blur" }
        ],
        gantzl2: [
          { required: true, message: "干土质量2不能为空", trigger: "blur" }
        ],
        hansl1: [
          { required: true, message: "含水率1不能为空", trigger: "blur" }
        ],
        hansl2: [
          { required: true, message: "含水率2不能为空", trigger: "blur" }
        ],
        hanslpjz: [
          { required: true, message: "含水率平均值不能为空", trigger: "blur" }
        ],
        ganmd: [
          { required: true, message: "干密度不能为空", trigger: "blur" }
        ],
        yasd: [
          { required: true, message: "压实度不能为空", trigger: "blur" }
        ],
        turlb: [
          { required: true, message: "土壤类别不能为空", trigger: "blur" }
        ],
        zuidgmd: [
          { required: true, message: "最大干密度不能为空", trigger: "blur" }
        ],
        bianh: [
          { required: true, message: "编号不能为空", trigger: "blur" }
        ]
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询压实度试验检测记录（环刀法）详细列表 */
    getList() {
      this.loading = true;
      listLjlmYsdhdfjlbBaDetail(this.queryParams).then(response => {
        this.ljlmYsdhdfjlbBaDetailList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: undefined,
        excelId: undefined,
        baRowNumber: undefined,
        delFlag: undefined,
        createBy: undefined,
        createTime: undefined,
        updateBy: undefined,
        updateTime: undefined,
        quyzh: undefined,
        jutwz: undefined,
        quysd: undefined,
        huandbh: undefined,
        tujhdzl: undefined,
        huandzl: undefined,
        tuzl: undefined,
        huandrj: undefined,
        shimd: undefined,
        heh1: undefined,
        heh2: undefined,
        heh1Id: undefined,
        heh2Id: undefined,
        hejstzl1: undefined,
        hejstzl2: undefined,
        hejgtzl1: undefined,
        hejgtzl2: undefined,
        shuizl1: undefined,
        shuizl2: undefined,
        hezl1: undefined,
        hezl2: undefined,
        gantzl1: undefined,
        gantzl2: undefined,
        hansl1: undefined,
        hansl2: undefined,
        hanslpjz: undefined,
        ganmd: undefined,
        yasd: undefined,
        turlb: undefined,
        zuidgmd: undefined,
        bianh: undefined
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加压实度试验检测记录（环刀法）详细";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.loading = true;
      this.reset();
      const id = row.id || this.ids
      getLjlmYsdhdfjlbBaDetail(id).then(response => {
        this.loading = false;
        this.form = response.data;
        this.open = true;
        this.title = "修改压实度试验检测记录（环刀法）详细";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.buttonLoading = true;
          if (this.form.id != null) {
            updateLjlmYsdhdfjlbBaDetail(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            }).finally(() => {
              this.buttonLoading = false;
            });
          } else {
            addLjlmYsdhdfjlbBaDetail(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            }).finally(() => {
              this.buttonLoading = false;
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除压实度试验检测记录（环刀法）详细编号为"' + ids + '"的数据项？').then(() => {
        this.loading = true;
        return delLjlmYsdhdfjlbBaDetail(ids);
      }).then(() => {
        this.loading = false;
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {
      }).finally(() => {
        this.loading = false;
      });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('report_ljlm/ljlmYsdhdfjlbBaDetail/export', {
        ...this.queryParams
      }, `ljlmYsdhdfjlbBaDetail_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
